<#include "*/component/Tags.ftl"/>
<@Title/>
<@ClassAnnotation>
@Data
@SqlTarget(target = "${entity.table.name} ${entity.table.alias}")
@SqlTableAlias(alias = "${entity.table.alias}")
</@ClassAnnotation>
<@Class extends='true'>

    <@ClassAnnotation>
${'\t'}@Getter
${'\t'}@SqlTableAlias(aliasFromClass = ${clazz.name}.class)
    </@ClassAnnotation>
    <@Class static=true extends='NotDeleteCondition' name='QueryCondition' tabTimes=1>
${'\t'}${'\t'}/**
${'\t'}${'\t'}* 主键
${'\t'}${'\t'}*/
${'\t'}${'\t'}@SqlColumn(name = "${entity.primaryField.column.name}")
${'\t'}${'\t'}@SqlCondition(nullable = false)
${'\t'}${'\t'}private ${entity.primaryField.type} ${entity.primaryField.name};

${'\t'}${'\t'}public QueryCondition(${entity.primaryField.type} id) {
${'\t'}${'\t'}${'\t'}this.${entity.primaryField.name} = id;
${'\t'}${'\t'}}
    </@Class>

</@Class>